package com.ll.example.springbootwebdemokotlin

import com.ll.example.springbootwebdemokotlin.repository.UserRepository
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
import javax.sql.DataSource

@RunWith(SpringRunner::class)
@SpringBootTest
class SpringbootWebdemoKotlinApplicationTests {
    @Autowired
    lateinit var dataSource: DataSource

    @Test
    fun contextLoads() {
        println(dataSource::class.java)
        println(dataSource.connection)


    }

    @Autowired
    lateinit var userRepository: UserRepository
    @Test
    fun jpaTest(){
       println(userRepository.findAll())
    }

}

